home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------------------
- # MPing 1.1 - MacTCP Ping Tool
- #
- # Copyright © Apple Computer, Inc. 1990-1991
- # All rights reserved.
- #
- # Versions:
- # 1.1 September 25, 1991.
- #
- # File:
- # MPing.c
- #
- # Components:
- # AddressXlation.h
- # MacTCPCommonTypes.h
- # Makefile
- # MiscIPPB.h
- # MPing.c
- # MPing.h
- # MPing.r
- # MPingDlg.c
- # MPingExtern.h
- # MPingGlobals.h
- # MPingIcmp.c
- # MPingWindow.c
- # resolver.c
- ------------------------------------------------------------------------------*/
-
- #define kMinSize 128 /* application's minimum size (in K) */
-
- #define kPrefSize 256 /* application's preferred size (in K) */
-
- #define rMenuBar 128 /* application's menu bar */
- #define rAboutAlert 128 /* about alert */
- #define rUserAlert 129 /* error user alert */
- #define rDialog 130 /* application's window/dialog */
- #define rVScroll 128 /* vertical scroll bar controls */
- #define rMsgRect 128 /* rectangle for ICMP message box */
-
- /* kSysEnvironsVersion is passed to SysEnvirons to tell it which version of the
- SysEnvRec we understand. */
-
- #define kSysEnvironsVersion 1
-
- /* kOSEvent is the event number of the suspend/resume and mouse-moved events sent
- by MultiFinder. Once we determine that an event is an osEvent, we look at the
- high byte of the message sent to determine which kind it is. To differentiate
- suspend and resume events we check the resumeMask bit. */
-
- #define kOSEvent app4Evt /* event used by MultiFinder */
- #define kSuspendResumeMessage 1 /* high byte of suspend/resume event message */
- #define kResumeMask 1 /* bit of message field for resume vs. suspend */
- #define kMouseMovedMessage 0xFA /* high byte of mouse-moved event message */
- #define kNoEvents 0 /* no events mask */
-
- /* The following constants are used to identify menus and their items. The menu IDs
- have an "m" prefix and the item numbers within each menu have an "i" prefix. */
-
- #define mApple 128 /* Apple menu */
- #define iAbout 1
-
- #define mFile 129 /* File menu */
- #define iNew 1
- #define iClose 4
- #define iQuit 12
-
- #define mEdit 130 /* Edit menu */
- #define iUndo 1
- #define iCut 3
- #define iCopy 4
- #define iPaste 5
- #define iClear 6
-
- #define mIPOptions 131 /* IP options menu */
- #define iRecordRoute 1
- #define iLooseSourceRR 2
- #define iStrictSourceRR 3
- #define iTimeStamp 4
- #define iSecurity 5
- #define iStreamID 6
-
- /* 1.01 - kTopLeft - This is for positioning the Disk Initialization dialogs. */
-
- #define kDITop 0x0050
- #define kDILeft 0x0070
-
- /* 1.01 - kMinHeap - This is the minimum result from the following
- equation:
-
- ORD(GetApplLimit) - ORD(ApplicZone)
-
- for the application to run. It will insure that enough memory will
- be around for reasonable-sized scraps, FKEYs, etc. to exist with the
- application, and still give the application some 'breathing room'.
- To derive this number, we ran under a MultiFinder partition that was
- our requested minimum size, as given in the 'SIZE' resource. 29*1024 */
-
- #define kMinHeap 29 * 1024
-
- /* 1.01 - kMinSpace - This is the minimum result from PurgeSpace, when called
- at initialization time, for the application to run. This number acts
- as a double-check to insure that there really is enough memory for the
- application to run, including what has been taken up already by
- pre-loaded resources, the scrap, code, and other sundry memory blocks. */
-
- #define kMinSpace 20 * 1024
-
- /* kExtremeNeg and kExtremePos are used to set up wide open rectangles and regions. */
-
- #define kExtremeNeg -32768
- #define kExtremePos 32767 - 1 /* required to address an old region bug */
-
- /* these #defines are used to set enable/disable flags of a menu */
-
- #define AllItems 0b1111111111111111111111111111111 /* 31 flags */
- #define NoItems 0b0000000000000000000000000000000
- #define MenuItem1 0b0000000000000000000000000000001
- #define MenuItem2 0b0000000000000000000000000000010
- #define MenuItem3 0b0000000000000000000000000000100
- #define MenuItem4 0b0000000000000000000000000001000
- #define MenuItem5 0b0000000000000000000000000010000
- #define MenuItem6 0b0000000000000000000000000100000
- #define MenuItem7 0b0000000000000000000000001000000
- #define MenuItem8 0b0000000000000000000000010000000
- #define MenuItem9 0b0000000000000000000000100000000
- #define MenuItem10 0b0000000000000000000001000000000
- #define MenuItem11 0b0000000000000000000010000000000
- #define MenuItem12 0b0000000000000000000100000000000
-
-
-
- /* 1.01 - changed constants to begin with 'k' for consistency, except for resource IDs */
- /* kTextMargin is the number of pixels we leave blank at the edge of the window. */
- #define kTextMargin 2
-
- /* kMaxDocWidth is an arbitrary number used to specify the width of the TERec's
- destination rectangle so that word wrap and horizontal scrolling can be
- demonstrated. */
- #define kMaxDocWidth 60
-
- /* kControlInvisible is used to 'turn off' controls (i.e., cause the control not
- to be redrawn as a result of some Control Manager call such as SetCtlValue)
- by being put into the contrlVis field of the record. kControlVisible is used
- the same way to 'turn on' the control. */
- #define kControlInvisible 0
- #define kControlVisible 0xFF
-
- /* kScrollbarAdjust and kScrollbarWidth are used in calculating
- values for control positioning and sizing. */
- #define kScrollbarWidth 16
- #define kScrollbarAdjust (kScrollbarWidth - 1)
-
- /* kScrollTweek compensates for off-by-one requirements of the scrollbars
- to have borders coincide with the growbox. */
- #define kScrollTweek 2
-
- /* kCrChar is used to match with a carriage return when calculating the
- number of lines in the TextEdit record. kDelChar is used to check for
- delete in keyDowns. */
- #define kCrChar 13
- #define kDelChar 8
-
- /* kButtonScroll is how many pixels to scroll horizontally when the button part
- of the horizontal scrollbar is pressed. */
- #define kButtonScroll 4
-
- /* kMaxTELength is an arbitrary number used to limit the length of text in the TERec
- so that various errors won't occur from too many characters in the text. */
- #define kMaxTELength 32000
-
- /* kExtremeNeg and kExtremePos are used to set up wide open rectangles and regions. */
- #define kExtremeNeg -32768
- #define kExtremePos (32767 - 1) /* required to address an old region bug */
-
- /* kTESlop provides some extra security when pre-flighting edit commands. */
- #define kTESlop 1024
-
- /* String constant indexes for STR# resource */
-
- #define rErrorStrings 128
-
- #define sPingHeader 1
- #define sPingTail sPingHeader+1
- #define sPktInfo sPingTail+1
- #define sTimeInfo sPktInfo+1
- #define sResolverErr sTimeInfo+1
- #define sExceedChar sResolverErr+1
- #define sWrongMachine sExceedChar+1
- #define sAppMemSmall sWrongMachine+1
- #define sNoWindow sAppMemSmall+1
- #define sNoRectRes sNoWindow+1
- #define sNoTERes sNoRectRes+1
- #define sNoVScrollBar sNoTERes+1
- #define sNoMenuBar sNoVScrollBar+1
- #define sHostNotResp sNoMenuBar+1
- #define sRecordedRoute sHostNotResp+1
- #define sNoRoutesRecorded sRecordedRoute+1
- #define sWaitValWrong sNoRoutesRecorded+1
- #define sSuccessPktStatus sWaitValWrong+1
- #define sTimeoutPktStatus sSuccessPktStatus+1
- #define sSourceAddress sTimeoutPktStatus+1
- #define sDestinationAddress sSourceAddress+1
-
- /* Cursor animation during ping */
- #define gFirstCuror 128
- #define gLastCursor 131
-